package com.kinghood.productcenter.common.model.dto.base;

import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.kinghood.sharding.model.KingHoodDefaultSort;
import com.kinghood.sharding.model.KingPageReqDTO;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Collections;
import java.util.List;

/**
 * description
 *
 * @author zhangFanJun
 * @date 2024-01-24 11:15
 **/
@Data
public class GetAttributePageListReqDTO extends KingPageReqDTO implements KingHoodDefaultSort, Serializable  {

    public static final String DEFAULT_COLUMN = "createTime";
    public static final String DEFAULT_Tail = "id";

    @Override
    public List<OrderItem> getDefaultSort() {
        OrderItem one = OrderItem.desc(DEFAULT_COLUMN);
        return Collections.singletonList(one);
    }

    @Override
    public List<OrderItem> getTailSort() {
        OrderItem one = OrderItem.asc(DEFAULT_Tail);
        return Collections.singletonList(one);
    }

    /**
     * 属性类别 1：系统预设，2：自定义
     */
    private Integer attributeType;
    /**
     * 属性
     */
    private String attribute;
    /**
     * 属性值
     */
    private String attributeValue;



}
